package o;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.util.TypedValue;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import androidx.annotation.IdRes;
import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import androidx.annotation.RestrictTo;
import androidx.annotation.RestrictTo.d;
import androidx.appcompat.app.AppCompatDelegate;
import o.hh.c;

public class ag extends Dialog implements ae {
    private AppCompatDelegate ˋ;
    private final c ˏ = new c(this) {
        final /* synthetic */ ag ॱ;

        {
            this.ॱ = r1;
        }

        public boolean ˊ(KeyEvent keyEvent) {
            return this.ॱ.ˏ(keyEvent);
        }
    };

    public ag(Context context, int i) {
        super(context, ˏ(context, i));
        ˋ().ˎ(null);
        ˋ().ᐝ();
    }

    protected void onCreate(Bundle bundle) {
        ˋ().ʼ();
        super.onCreate(bundle);
        ˋ().ˎ(bundle);
    }

    public void setContentView(@LayoutRes int i) {
        ˋ().ˊ(i);
    }

    public void setContentView(View view) {
        ˋ().ˏ(view);
    }

    public void setContentView(View view, LayoutParams layoutParams) {
        ˋ().ˏ(view, layoutParams);
    }

    @Nullable
    public <T extends View> T findViewById(@IdRes int i) {
        return ˋ().ˋ(i);
    }

    public void setTitle(CharSequence charSequence) {
        super.setTitle(charSequence);
        ˋ().ˎ(charSequence);
    }

    public void setTitle(int i) {
        super.setTitle(i);
        ˋ().ˎ(getContext().getString(i));
    }

    public void addContentView(View view, LayoutParams layoutParams) {
        ˋ().ˎ(view, layoutParams);
    }

    protected void onStop() {
        super.onStop();
        ˋ().ॱ();
    }

    public boolean ˎ(int i) {
        return ˋ().ˎ(i);
    }

    @RestrictTo({d.LIBRARY_GROUP})
    public void invalidateOptionsMenu() {
        ˋ().ॱॱ();
    }

    public AppCompatDelegate ˋ() {
        if (this.ˋ == null) {
            this.ˋ = AppCompatDelegate.ˎ((Dialog) this, (ae) this);
        }
        return this.ˋ;
    }

    private static int ˏ(Context context, int i) {
        if (i != 0) {
            return i;
        }
        TypedValue typedValue = new TypedValue();
        context.getTheme().resolveAttribute(ah.c.ˊᐝ, typedValue, true);
        return typedValue.resourceId;
    }

    public void ˋ(aw awVar) {
    }

    public void ˎ(aw awVar) {
    }

    @Nullable
    public aw ˏ(aw.c cVar) {
        return null;
    }

    boolean ˏ(KeyEvent keyEvent) {
        return super.dispatchKeyEvent(keyEvent);
    }

    public boolean dispatchKeyEvent(KeyEvent keyEvent) {
        return hh.ˋ(this.ˏ, getWindow().getDecorView(), this, keyEvent);
    }
}
